package com.sfbest.TestHession;

import java.util.List;

import com.caucho.hessian.client.HessianProxyFactory;
import com.sfbest.orderservice.api.order.FreshOrderServiceAPI;
import com.sfbest.orderservice.api.order.bean.PickOrder;
import com.sfbest.orderservice.api.order.bean.PickOrderQuery;
import com.sfbest.orderservice.api.order.dto.FreshOrderProductsDto;
import com.sfbest.orderservice.api.order.dto.PickOrderDto;

public class TestHession {

	/**
	 * TODO
	 *
	 * @author sfbest
	 * @created 2015-9-22 上午10:49:35
	 *
	 * @param args
	 */
	public static void main(String[] args) {
//		String url = "http://10.103.11.23:8080/sfbest-orderservice-web/api/freshOrderService";  
//		String url = "http://10.103.11.89:80/orderServcie/api/freshOrderService";  
		 String url ="http://10.103.11.117:8080/orderservice/api/freshOrderService";

		HessianProxyFactory f = new HessianProxyFactory();  
        try {  
        	FreshOrderServiceAPI basic = (FreshOrderServiceAPI)f.create(FreshOrderServiceAPI.class, url);  
//        	PickOrderQuery p = new PickOrderQuery();
//    		p.setMdid("755DACS");
//    		p.setPageNo(1);
//    		p.setPageSize(4);
//    		p.setDepotNo("北京仓库");
////    		p.setPickingOrderNo("PS000111509192338559619");
//    		p.setState(-1);
//    		
//			PickOrderDto pdo = basic.queryPickOrderListPage(p);
//			System.out.println("code:"+pdo.getCode()+" reson:"+pdo.getReason()+" tatal:"+pdo.getTotal());
//			List<PickOrder> pl= pdo.getPickOrderRetList();
//			System.out.println(pl.size());
//			for(PickOrder po :pl){
//				System.out.println("拣货单号: "+po.getPickSn()+" 拣货单状态："+po.getPickStatus()+" 发货时间："+po.getShippingTime()+" 仓库电话："+po.getWarehouseMobile()
//							+" 仓库名称:"+po.getWarehouseName()+" 仓库联系人:"+po.getWarehousePerson()+" 预计到店时间"+po.getExpectArriveStoreTime()+" "+po.getChildOrderList());
//			}
//    			
			
			FreshOrderProductsDto dto =basic.queryFreshOrderProductList("8201509170000301");
			System.out.println(dto.getCode());
			
			
			
        } catch (Exception e) {  
            e.printStackTrace();  
        }  
	}

}
